﻿#include "qnet.h"
#include<QDebug>
QNet::QNet(const QString &fileName,QGraphicsScene *scene):QPixItem(fileName,scene)
{

}

void QNet::advance(int phase)
{
    QFish *fish;
    if(this->collidingItems().count()>0){
        QList<QGraphicsItem *> list=this->collidingItems();
        for(QList<QGraphicsItem *>::iterator it=list.begin();it!=list.end();it++){
            fish=(QFish *)(*it);
            fish->fish_death();
        }
    }
    this->hide();
    delete this;
}


